﻿@model EC18_ESHOP.Models.ORDER_TO_PROVIDER
@{
    ViewBag.Title = "NewOder";
    Layout = "~/Areas/Admin/Views/Shared/_Admin.cshtml";
}
<script src="~/Content/ckeditor/ckeditor.js"></script>
<div class="page-header position-relative">
    <h1>Quản lý đơn đặt hàng tới nhà cung cấp
		<small>
            <i class="icon-double-angle-right"></i>
            Thêm mới đơn đặt hàng
        </small>
    </h1>
    @{
        int status = ViewBag.Status;
        switch (status)
        {
            case 1: <label style="color: green; font-size: large">Thêm mới  thành công</label>
                break;
            case 2: <label style="color: red; font-size: large">Thêm mới thất bại</label>
                break;
        }
    }
</div>
<!--/.page-header-->

<div class="row-fluid span12">
    @using (Html.BeginForm("NewOder", null, FormMethod.Post, new { @role = "form", enctype = "multipart/form-data" }))
    {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)

        <div class="form-horizontal">
            <div class="control-group">
                <label class="control-label" for="ulImages">Mã đơn đặt hàng: </label>
                <div class="controls">
                    @Html.EditorFor(model => model.OrderProviderId)
                    @Html.ValidationMessageFor(model => model.OrderProviderId)
                </div>
            </div>           
             <div class="control-group">
                    <label class="control-label" for="txtDate">Ngày đặt hàng </label>

                    <div class="controls">
                       <input type="date" class="form-control" name="NgayLap">
                    </div>
                </div>             
            <div class="control-group">
                <label class="control-label" for="ulImages">Giá trị đơn hàng</label>
                <div class="controls">
                    @Html.EditorFor(model => model.Value, new { @type = "number" })
                    @Html.ValidationMessageFor(model => model.Value)
                </div>
            </div>         

            <div class="control-group">
                <label class="control-label" for="ulImages">Nhà cung cấp</label>
                <div class="controls">
                    <div class="widget-box span3">
                        <div id="manufacturer">
                            @Html.DropDownList("ProviderID", null, new { @class = "form-control" })
                            @Html.ValidationMessageFor(model => model.PROVIDER.ProviderId)
                        </div>
                    </div>
                    

                </div>
            </div>
            <div class="control-group">
                    <label class="control-label" for="txtDateDelivery">Ngày nhận hàng </label>

                    <div class="controls">
                       <input type="date" class="form-control" name="NgayNhan">
                    </div>
                </div>
        </div>
        <h5 class="header green clearfix">ghi chú</h5>
        @Html.TextAreaFor(model => model.Note, new { @class = "ckeditor", rows = "10", cols = "80" })
        @Html.ValidationMessageFor(model => model.Note)

        <div class="control-group">
            <table id="sample-table-2" class="table table-striped table-bordered table-hover">
        <thead>
            <tr>
                <th class="center">
                    <label>
                        <input type="checkbox">
                        <span class="lbl"></span>
                    </label>
                </th>
                <th>Mã chi tiết đơn đặt hàng</th>
                                <th class="hidden-480">Mã sản phẩm </th>
                <th class="hidden-480">Số lượng</th>
                <th class="hidden-480">Đơn giá</th>
                <th class="hidden-480">Ghi chú</th>             
                                <th>Xử lí</th>
            </tr>
        </thead>

        <tbody>
            <tr>
                <td class="center">
                    <label>
                        <input type="checkbox">
                        <span class="lbl"></span>
                    </label>
                </td>

                <td>
                    <a href="#">1</a>
                </td>
                <td>Sao Việt</td>
                <td class="hidden-480">500.000.000</td>
                <td class="hidden-phone">13-1-2014</td>
                <td class="hidden-phone">13-1-2014</td>
                <td></td>
                <td class="hidden-phone"> Chuyển khoản</td>
                <td class="hidden-phone">Đã giao</td>
                <td class="hidden-480">
                    <span class="label label-success"></span>
                </td>

                <td class="td-actions">
                    <div class="hidden-phone visible-desktop action-buttons">
                        <a class="blue" href="/Admin/AdminWareHouse/DetailOder" "="">
                            <i class="icon-zoom-in bigger-130"></i>
                        </a>

                        <a class="green" href="~/Admin/AdminWareHouse/UpdateOder">
                            <i class="icon-pencil bigger-130"></i>
                        </a>

                        <a class="red" href="#">
                            <i class="icon-trash bigger-130"></i>
                        </a>
                      
                    </div>

                    <div class="hidden-desktop visible-phone">
                        <div class="inline position-relative">
                            <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
                                <i class="icon-caret-down icon-only bigger-120"></i>
                            </button>

                            <ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
                                <li>
                                    <a href="#" class="tooltip-info" data-rel="tooltip" title="View">
                                        <span class="blue">
                                            <i class="icon-zoom-in bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
                                        <span class="green">
                                            <i class="icon-edit bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
                                        <span class="red">
                                            <i class="icon-trash bigger-120"></i>
                                        </span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="center">
                    <label>
                        <input type="checkbox">
                        <span class="lbl"></span>
                    </label>
                </td>

                <td>
                    <a href="#">2</a>
                </td>
                <td>Nguyễn Kim</td>
                <td class="hidden-480">700.000.000</td>
                <td class="hidden-phone">13-1-2014</td>
                <td class="hidden-phone">13-1-2014</td>
                <td></td>
                <td class="hidden-phone"> Thanh toán trực tiếp</td>
                <td class="hidden-phone">Đã giao</td>
                <td class="hidden-480">
                    <span class="label label-success"></span>
                </td>

                <td class="td-actions">
                    <div class="hidden-phone visible-desktop action-buttons">
                        <a class="blue" href="/Admin/AdminWareHouse/DetailOder">
                            <i class="icon-zoom-in bigger-130"></i>
                        </a>

                        <a class="green" href="/Admin/AdminWareHouse/UpdateOder">
                            <i class="icon-pencil bigger-130"></i>
                        </a>

                        <a class="red" href="#">
                            <i class="icon-trash bigger-130"></i>
                        </a>
                        
                    </div>

                    <div class="hidden-desktop visible-phone">
                        <div class="inline position-relative">
                            <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
                                <i class="icon-caret-down icon-only bigger-120"></i>
                            </button>

                            <ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
                                <li>
                                    <a href="#" class="tooltip-info" data-rel="tooltip" title="View">
                                        <span class="blue">
                                            <i class="icon-zoom-in bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
                                        <span class="green">
                                            <i class="icon-edit bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
                                        <span class="red">
                                            <i class="icon-trash bigger-120"></i>
                                        </span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="center">
                    <label>
                        <input type="checkbox">
                        <span class="lbl"></span>
                    </label>
                </td>

                <td>
                    <a href="#">3</a>
                </td>
                <td>Thiên Hòa</td>
                <td class="hidden-480">800.000.000</td>
                <td class="hidden-phone">13-1-2014</td>
                <td class="hidden-phone">13-1-2014</td>
                <td></td>
                <td class="hidden-phone"> Chuyển khoản</td>
                <td class="hidden-phone">Đã giao</td>
                <td class="hidden-480">
                    <span class="label label-success"></span>
                </td>

                <td class="td-actions">
                    <div class="hidden-phone visible-desktop action-buttons">
                        <a class="blue" href="/Admin/AdminWareHouse/DetailOder">
                            <i class="icon-zoom-in bigger-130"></i>
                        </a>

                        <a class="green" href="/Admin/AdminWareHouse/UpdateOder">
                            <i class="icon-pencil bigger-130"></i>
                        </a>

                        <a class="red" href="#">
                            <i class="icon-trash bigger-130"></i>
                        </a>
                       
                    </div>

                    <div class="hidden-desktop visible-phone">
                        <div class="inline position-relative">
                            <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
                                <i class="icon-caret-down icon-only bigger-120"></i>
                            </button>

                            <ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
                                <li>
                                    <a href="#" class="tooltip-info" data-rel="tooltip" title="View">
                                        <span class="blue">
                                            <i class="icon-zoom-in bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
                                        <span class="green">
                                            <i class="icon-edit bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
                                        <span class="red">
                                            <i class="icon-trash bigger-120"></i>
                                        </span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="center">
                    <label>
                        <input type="checkbox">
                        <span class="lbl"></span>
                    </label>
                </td>

                <td>
                    <a href="#">4</a>
                </td>
                <td>Phan Huy</td>
                <td class="hidden-480">700.000.000</td>
                <td class="hidden-phone">13-1-2014</td>
                <td class="hidden-phone">13-1-2014</td>
                <td></td>
               <td class="hidden-phone"> Chuyển khoản</td>
                <td class="hidden-phone">Đã giao</td>
                <td class="hidden-480">
                    <span class="label label-success"></span>
                </td>

                <td class="td-actions">
                    <div class="hidden-phone visible-desktop action-buttons">
                        <a class="blue" href="/Admin/AdminWareHouse/DetailOder">
                            <i class="icon-zoom-in bigger-130"></i>
                        </a>

                        <a class="green" href="/Admin/AdminWareHouse/UpdateOder">
                            <i class="icon-pencil bigger-130"></i>
                        </a>

                        <a class="red" href="#">
                            <i class="icon-trash bigger-130"></i>
                        </a>
                        
                    </div>

                    <div class="hidden-desktop visible-phone">
                        <div class="inline position-relative">
                            <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
                                <i class="icon-caret-down icon-only bigger-120"></i>
                            </button>

                            <ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
                                <li>
                                    <a href="#" class="tooltip-info" data-rel="tooltip" title="View">
                                        <span class="blue">
                                            <i class="icon-zoom-in bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
                                        <span class="green">
                                            <i class="icon-edit bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
                                        <span class="red">
                                            <i class="icon-trash bigger-120"></i>
                                        </span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="center">
                    <label>
                        <input type="checkbox">
                        <span class="lbl"></span>
                    </label>
                </td>

                <td>
                    <a href="#">5</a>
                </td>
                <td>Nguyễn Kim</td>
                <td class="hidden-480">900.000.000</td>
                <td class="hidden-phone">13-1-2014</td>
                <td class="hidden-phone">13-1-2014</td>
                <td></td>
               <td class="hidden-phone"> Chuyển khoản</td>
                <td class="hidden-phone">Đã giao</td>
                <td class="hidden-480">
                    <span class="label label-success"></span>
                </td>

                <td class="td-actions">
                    <div class="hidden-phone visible-desktop action-buttons">
                        <a class="blue" href="/Admin/AdminWareHouse/DetailOder">
                            <i class="icon-zoom-in bigger-130"></i>
                        </a>

                        <a class="green" href="/Admin/AdminWareHouse/UpdateOder">
                            <i class="icon-pencil bigger-130"></i>
                        </a>

                        <a class="red" href="#">
                            <i class="icon-trash bigger-130"></i>
                        </a>
                       
                    </div>

                    <div class="hidden-desktop visible-phone">
                        <div class="inline position-relative">
                            <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
                                <i class="icon-caret-down icon-only bigger-120"></i>
                            </button>

                            <ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
                                <li>
                                    <a href="#" class="tooltip-info" data-rel="tooltip" title="View">
                                        <span class="blue">
                                            <i class="icon-zoom-in bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
                                        <span class="green">
                                            <i class="icon-edit bigger-120"></i>
                                        </span>
                                    </a>
                                </li>

                                <li>
                                    <a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
                                        <span class="red">
                                            <i class="icon-trash bigger-120"></i>
                                        </span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
        </div>
        
        <div class="imgUpdate">
            
            <div class="space-4"></div>
            <div class="form-horizontal">
                <div class="form-actions">
                    <button class="btn btn-info" type="submit">
                        <i class="icon-ok bigger-110"></i>
                        Lưu
                    </button>
                    <button class="btn" type="reset">
                        <i class="icon-undo bigger-110"></i>
                        Hủy
                    </button>
                </div>
            </div>
        </div>   
    }
</div>
<!----------->

<script type="text/javascript">
    function getSelectedText(elementId) {
        var elt = document.getElementById(elementId);
        if (elt.selectedIndex == -1)
            return null;

        return elt.options[elt.selectedIndex].value;
    }


</script>


@section scripts{
    <script src="~/Content/assets/js/markdown/markdown.js"></script>
    <script src="~/Content/assets/js/markdown/bootstrap-markdown.js"></script>
    <script src="~/Content/assets/js/jquery.hotkeys.js"></script>
    <script src="~/Content/assets/js/bootstrap-wysiwyg.js"></script>
    <script src="~/Content/assets/js/bootbox.js"></script>
}
